function onLoadHandler() {
  var canvas  = document.getElementById('canvas');
  var  context = canvas.getContext('2d');
  context.font = "30px Arial";
  context.fillText("ASTEROID GAME",40,50);
}

window.onload = onLoadHandler;